<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>serial: serial::IOException Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">serial
   &#160;<span id="projectnumber">1.1.0</span>
   </div>
   <div id="projectbrief">Cross-platform, serial port library written in C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceserial.html">serial</a></li><li class="navelem"><a class="el" href="classserial_1_1_i_o_exception.html">IOException</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">serial::IOException Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="serial_8h_source.html">serial.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for serial::IOException:</div>
<div class="dyncontent">
<div class="center"><img src="classserial_1_1_i_o_exception__inherit__graph.png" border="0" usemap="#serial_1_1_i_o_exception_inherit__map" alt="Inheritance graph"/></div>
<map name="serial_1_1_i_o_exception_inherit__map" id="serial_1_1_i_o_exception_inherit__map">
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for serial::IOException:</div>
<div class="dyncontent">
<div class="center"><img src="classserial_1_1_i_o_exception__coll__graph.png" border="0" usemap="#serial_1_1_i_o_exception_coll__map" alt="Collaboration graph"/></div>
<map name="serial_1_1_i_o_exception_coll__map" id="serial_1_1_i_o_exception_coll__map">
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acb2f2cf7a5cc8090945f6cbfcef3ef1e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classserial_1_1_i_o_exception.html#acb2f2cf7a5cc8090945f6cbfcef3ef1e">IOException</a> (std::string file, int line, int errnum)</td></tr>
<tr class="separator:acb2f2cf7a5cc8090945f6cbfcef3ef1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc1d2c650832cc8127f2cd777072b2cd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classserial_1_1_i_o_exception.html#acc1d2c650832cc8127f2cd777072b2cd">IOException</a> (std::string file, int line, const char *description)</td></tr>
<tr class="separator:acc1d2c650832cc8127f2cd777072b2cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a026ae2e6abc57c6069915f0f8c701390"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classserial_1_1_i_o_exception.html#a026ae2e6abc57c6069915f0f8c701390">~IOException</a> ()  throw ()</td></tr>
<tr class="separator:a026ae2e6abc57c6069915f0f8c701390"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af65196a71b800d11b5e5c367caf5b354"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classserial_1_1_i_o_exception.html#af65196a71b800d11b5e5c367caf5b354">IOException</a> (const <a class="el" href="classserial_1_1_i_o_exception.html">IOException</a> &amp;other)</td></tr>
<tr class="separator:af65196a71b800d11b5e5c367caf5b354"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1c0af34b4547249b473e958699552d7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classserial_1_1_i_o_exception.html#aa1c0af34b4547249b473e958699552d7">getErrorNumber</a> () const </td></tr>
<tr class="separator:aa1c0af34b4547249b473e958699552d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5151f78cf0309db2c79f3dc4c779c774"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classserial_1_1_i_o_exception.html#a5151f78cf0309db2c79f3dc4c779c774">what</a> () const   throw ()</td></tr>
<tr class="separator:a5151f78cf0309db2c79f3dc4c779c774"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acb2f2cf7a5cc8090945f6cbfcef3ef1e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">serial::IOException::IOException </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>errnum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;    : file_(file), line_(line), errno_(errnum) {</div><div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;      std::stringstream ss;</div><div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;<span class="preprocessor">#if defined(_WIN32) &amp;&amp; !defined(__MINGW32__)</span></div><div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;      <span class="keywordtype">char</span> error_str [1024];</div><div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;      strerror_s(error_str, 1024, errnum);</div><div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;      <span class="keywordtype">char</span> * error_str = strerror(errnum);</div><div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;      ss &lt;&lt; <span class="stringliteral">&quot;IO Exception (&quot;</span> &lt;&lt; errno_ &lt;&lt; <span class="stringliteral">&quot;): &quot;</span> &lt;&lt; error_str;</div><div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;      ss &lt;&lt; <span class="stringliteral">&quot;, file &quot;</span> &lt;&lt; file_ &lt;&lt; <span class="stringliteral">&quot;, line &quot;</span> &lt;&lt; line_ &lt;&lt; <span class="stringliteral">&quot;.&quot;</span>;</div><div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;      e_what_ = ss.str();</div><div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;  }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="acc1d2c650832cc8127f2cd777072b2cd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">serial::IOException::IOException </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>description</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;    : file_(file), line_(line), errno_(0) {</div><div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;      std::stringstream ss;</div><div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;      ss &lt;&lt; <span class="stringliteral">&quot;IO Exception: &quot;</span> &lt;&lt; description;</div><div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;      ss &lt;&lt; <span class="stringliteral">&quot;, file &quot;</span> &lt;&lt; file_ &lt;&lt; <span class="stringliteral">&quot;, line &quot;</span> &lt;&lt; line_ &lt;&lt; <span class="stringliteral">&quot;.&quot;</span>;</div><div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;      e_what_ = ss.str();</div><div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;  }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a026ae2e6abc57c6069915f0f8c701390"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual serial::IOException::~IOException </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
        <tr>
          <td align="right">throw </td><td>(</td><td colspan="2"></td>
        </tr>
        <tr>
          <td align="right"></td><td>)</td><td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;{}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af65196a71b800d11b5e5c367caf5b354"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">serial::IOException::IOException </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classserial_1_1_i_o_exception.html">IOException</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;: line_(other.line_), e_what_(other.e_what_), errno_(other.errno_) {}</div></div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa1c0af34b4547249b473e958699552d7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int serial::IOException::getErrorNumber </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;{ <span class="keywordflow">return</span> errno_; }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5151f78cf0309db2c79f3dc4c779c774"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* serial::IOException::what </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
        <tr>
          <td align="right">throw </td><td>(</td><td colspan="2"></td>
        </tr>
        <tr>
          <td align="right"></td><td>)</td><td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;                                             {</div><div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;    <span class="keywordflow">return</span> e_what_.c_str();</div><div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;  }</div></div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/serial/<a class="el" href="serial_8h_source.html">serial.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Aug 20 2018 10:52:41 for serial by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
